package com.pwt.entity;

import com.pwt.annotation.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import com.pwt.entity.base.BaseEntity;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;

import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Data;

import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;


/**
 * WhatLineHierarchy
 *
 * @author auto generated
 * @date 2022-02-11 17:22:03
 */
@EqualsAndHashCode
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "[what_line_hierarchy]")
@Schema(name = "WhatLineHierarchy")
@DynamicInsert
@DynamicUpdate
public class WhatLineHierarchy {

	@Id
	@GeneratedValue(generator="system_uuid")
	@GenericGenerator(name="system_uuid",strategy="uuid")
	@Column(name = "id")
	@Schema(description = "ID")
	@NotBlank(groups = Update.class,message = "修改时必传")
	protected String id;

	/**
	 * ??id
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "whatLineId",description = "??id")
	@Column(name = "what_line_id", nullable = true, length = 32)
	private String whatLineId;

	/**
	 * ??id
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "hierarchyId",description = "??id")
	@Column(name = "hierarchy_id", nullable = true, length = 32)
	private String hierarchyId;
}
